package com.study.constructor;

public class Car {
    String name;
    double price;

    /**
     * 无参构造器
     */
    public Car() {
        System.out.println("无参数构造器被调用了！");
    }

    /**
     * 有参构造器
     * @param name
     * @param price
     */
    public Car(String name, double price) {
        this.name = name;
        this.price = price;
    }
}
